home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
addres
/
setup.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
4KB
|
114 lines
VERSION 2.00
Begin Form Setup
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Port SetUp"
ClientHeight = 1740
ClientLeft = 3495
ClientTop = 3090
ClientWidth = 1935
Height = 2145
Left = 3435
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1740
ScaleWidth = 1935
Top = 2745
Width = 2055
Begin SSCommand Command3D1
BevelWidth = 4
Caption = "&Ok"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 480
TabIndex = 3
Top = 1320
Width = 975
End
Begin SSFrame Frame3D1
Caption = "Comm Port:"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1095
Left = 240
ShadowColor = 1 'Black
ShadowStyle = 1 'Raised
TabIndex = 0
Top = 120
Width = 1455
Begin SSOption Option3D2
Caption = "COM2:"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 240
TabIndex = 2
Top = 600
Width = 975
End
Begin SSOption Option3D1
Caption = "COM1:"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 975
End
End
End
Sub Command3D1_Click ()
'save settings to ini file
ThePort$ = ""
If Option3D1.Value Then
ThePort$ = "1"
ElseIf Option3D2.Value Then
ThePort$ = "2"
End If
If ThePort$ = "" Then
Unload Setup
Exit Sub
End If
INIFile$ = ThePath & "ADDRESS.INI"
y% = WritePPKeyString%("Phone", "Port", ThePort$, INIFile$)
Unload Setup
End Sub
Sub Form_Load ()
'check ini file for previous settings
Setup.Top = Address.Top + (Address.Height - Setup.Height) \ 3
Setup.Left = Address.Left + (Address.Width - Setup.Width) \ 2
Default$ = "NOPORT"
INIFile$ = ThePath & "Address.ini"
ThePort$ = GetPPKeyString$("Phone", "Port", Default$, INIFile$)
If ThePort$ = "1" Then
Option3D1.Value = True
ElseIf ThePort$ = "2" Then
Option3D2.Value = True
End If
End Sub